package org.huatek.anders;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * @author anders
 * @date 2018-11-01 14:28
 **/
@SpringBootApplication
public class PublicConsumerApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(PublicConsumerApplication.class,args);
    }

    /**
     * 打war包 需要继承SpringBootServletInitializer 重写configure
     * @param builder
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(PublicConsumerApplication.class);
    }
}
